package com.woniu.after.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 订单物流
 * @TableName t_order_express
 */
@TableName(value ="t_order_express")
@Data
public class TOrderExpress implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 物流公司名称
     */
    private String companyName;

    /**
     * 物流公司编码
     */
    private String companyCode;

    /**
     * 快递单号
     */
    private String expressCode;

    /**
     * 状态 0运输中 1已到达 2已取消 -1已删除
     */
    private String status;

    /**
     * 起始省
     */
    private String startProvince;

    /**
     * 起始市
     */
    private String startPlace;

    /**
     * 结束省
     */
    private String endProvince;

    /**
     * 结束市
     */
    private String endPlace;

    /**
     * 子订单id
     */
    private Long orderDetailId;

    /**
     * 创建时间
     */
    private Date createTime;

    private String startArea;
    private String startAddr;
    private String endArea;
    private String endAddr;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TOrderExpress other = (TOrderExpress) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
            && (this.getCompanyCode() == null ? other.getCompanyCode() == null : this.getCompanyCode().equals(other.getCompanyCode()))
            && (this.getExpressCode() == null ? other.getExpressCode() == null : this.getExpressCode().equals(other.getExpressCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getStartProvince() == null ? other.getStartProvince() == null : this.getStartProvince().equals(other.getStartProvince()))
            && (this.getStartPlace() == null ? other.getStartPlace() == null : this.getStartPlace().equals(other.getStartPlace()))
            && (this.getEndProvince() == null ? other.getEndProvince() == null : this.getEndProvince().equals(other.getEndProvince()))
            && (this.getEndPlace() == null ? other.getEndPlace() == null : this.getEndPlace().equals(other.getEndPlace()))
            && (this.getOrderDetailId() == null ? other.getOrderDetailId() == null : this.getOrderDetailId().equals(other.getOrderDetailId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getCompanyCode() == null) ? 0 : getCompanyCode().hashCode());
        result = prime * result + ((getExpressCode() == null) ? 0 : getExpressCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getStartProvince() == null) ? 0 : getStartProvince().hashCode());
        result = prime * result + ((getStartPlace() == null) ? 0 : getStartPlace().hashCode());
        result = prime * result + ((getEndProvince() == null) ? 0 : getEndProvince().hashCode());
        result = prime * result + ((getEndPlace() == null) ? 0 : getEndPlace().hashCode());
        result = prime * result + ((getOrderDetailId() == null) ? 0 : getOrderDetailId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", companyName=").append(companyName);
        sb.append(", companyCode=").append(companyCode);
        sb.append(", expressCode=").append(expressCode);
        sb.append(", status=").append(status);
        sb.append(", startProvince=").append(startProvince);
        sb.append(", startPlace=").append(startPlace);
        sb.append(", endProvince=").append(endProvince);
        sb.append(", endPlace=").append(endPlace);
        sb.append(", orderDetailId=").append(orderDetailId);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}